package com.gmcloud.common.security.exception;

import org.springframework.security.oauth2.core.OAuth2AuthenticationException;
import org.springframework.security.oauth2.core.OAuth2Error;

/**
 * @author zl.sir
 * @version 1.0
 * @since 2022/8/18 16:23
 */
public class OAuthClientException extends OAuth2AuthenticationException {

    /**
     * Constructs a <code>ScopeException</code> with the specified message.
     * @param msg the detail message.
     */
    public OAuthClientException(String msg) {
        super(new OAuth2Error(msg), msg);
    }

    /**
     * Constructs a {@code ScopeException} with the specified message and root cause.
     * @param msg the detail message.
     * @param cause root cause
     */
    public OAuthClientException(String msg, Throwable cause) {
        super(new OAuth2Error(msg), cause);
    }

}
